home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.lang.c++
- Path: presby.edu!jtbell
- From: jtbell@presby.edu (Jon Bell)
- Subject: Re: Recursive CONSTRUCTOR allowed?
- Message-ID: <Dpzr3B.DDx@presby.edu>
- Date: Wed, 17 Apr 1996 05:25:59 GMT
- References: <4l1ck5$pit@falcon.ccs.uwo.ca>
- Organization: Presbyterian College, Clinton, South Carolina USA
-
- Sharon Wang <swang1@julian.uwo.ca> wrote:
- >I'd like to implement the following algorithm using constructor
- >(I am TOLD to do so)
- >
- >// create an n linked list
- >create node(n)
- >{
- > if (n = 0) then
- > reach the length, don't create!
- > else
- > create this node;
- > create node(n-1);
- > make link;
- > end if
- > return;
- >}
- >
- >(1) FIrst of all, does this make sense?
-
- No. (Not to *me*, anyway... :-)) What is an "n linked list"?
-
- --
- Jon Bell <jtbell@presby.edu> Presbyterian College
- Dept. of Physics and Computer Science Clinton, South Carolina USA
-